Adding and Searching Customer Records from Database | ASP.NET | Web Technology
Step 2: Add Web Form for the empty website application
Website -----àAdd New Item -> WebForm
The default web form name is Default.aspx
Step 3:
There will be 2 Webforms for this program
1. AddCustomer.aspx
2. Search.aspx
Design Page[AddCustomer.aspx]
Step 4: Adding the Database to the Program.
There will be 2 Webforms for this program
1. AddCustomer.aspx
2. Search.aspx
Design Page[AddCustomer.aspx]
Design Page[Search.aspx]
This also same procedure like how we added the web form
Website --à Add New Item -àSQL Server Database
For Creating Tables in the database first You have to select the Database Explorer
You have Select Tables Folder then right-click and Select Add New table
Then Add Table Columns and its Data Types
After Specifying all the Columns and DataTypes Press Ctrl+S to save the table with its Name Here it is Customer.
After Successful Creation of Table in Database It will looks like this:
Step 5: We require Connection String to Obtain the connection between the Front-end Application with Back-end.
Click the Configure Data Source
Keep on clicking next then click Finish Button.
The Connection is created.
Step 6: Code for Add Customer Button in AddCustomer.aspx page
remember always add Namespaces at the top before typing program
remember always add Namespaces at the top before typing program
The Connection is created.
Step 6: Code for Add Customer Button in AddCustomer.aspx page
remember always add Namespaces at the top before typing program
Code for txtSearch Textbox in Search.aspx page
double click the txtSearch Textbox
Step 7 : Executing the program using Ctrl+F5.
Output 1
Output 2
Output 3
Post a Comment